// main_init function main_init = function(mc){ spectrumbox = function(mc,tl_x, tl_y, br_x, br_y ){ mc.lineStyle(); if (rainbow_spectrum){ var colors = [0xff0000,0xffff00,0x00ff00,0x00ffff,0x0000ff,0xff00ff,0xff0000]; var alphas = [100,100,100,100,100,100,100]; var ratios = [0,43,85,128,171,213,255]; } else { var colors = [spectrum_color1,spectrum_color2,spectrum_color1]; var alphas = [100,100,100]; var ratios = [0,128,255]; } var matrix = {matrixtype:'box',w:br_x-tl_x,h:br_y-tl_y,x:tl_x-0,y:tl_y-0,r:cycle_vertical ? deg90:0}; mc.beginGradientFill('linear',colors,alphas,ratios,matrix); mc.moveTo (tl_x,tl_y); mc.lineTo (br_x,tl_y); mc.lineTo (br_x,br_y); mc.lineTo (tl_x,br_y); mc.endFill(); } subs_done = true; if (shade_offset){ mc.duplicateMovieClip('shade',2); shade._x = Math.cos(shade_direction / 180 * Math.PI) * shade_offset; shade._y = -Math.sin(shade_direction / 180 * Math.PI) * shade_offset; shade._alpha = shade_alpha; clr = new Color(shade); clr.setRGB(0); } createEmptyMovieClip('bar',3); mc.duplicateMovieClip('mask',4); bar.setMask(mask); mc._alpha=orig_text_alpha; b=mc.getBounds(mc); if (cycle_vertical){ spec_cnt = Math.ceil(mc._height / spectrum_size)+1; for (i=0;i